package com.huluobo.kotlindemoim1911a2.contract.splash

import com.hyphenate.chat.EMClient

/**
 * Created by lc on 2022/10/17.
 */
class SplashPresenter(private val view: SplashContract.View) : SplashContract.Presenter {
    override fun checkLoginStatus() {
        if (isLoggedIn()) view.onLoggedIn() else view.onNotLoggedIn()
    }

    //写一个判断的方法,相当于网络获取的model层
    private fun isLoggedIn(): Boolean = EMClient.getInstance().isLoggedInBefore
}